Instance-level explanation
Introduction
Instance-level explainers help to understand how a model yields a prediction for a single observation. We can think about the following situations as examples:
- We may want to evaluate the effects of explanatory variables on model predictions. For instance, we may be interested in predicting the risk of heart attack based on person’s age, sex, and smoking habits. A model may be used to construct a score (for instance, a linear combination of the explanatory variables representing age, sex, and smoking habits) that could be used for the purposes of prediction. For a particular patient We may want to learn how much the different variables contribute to the patient’s score?
- We may want to understand how models predictions would change if values of some of the explanatory variables changed. For instance, what would be the predicted risk of heart attack if the patient cut the number of cigarettes smoked per day by half?
- We may discover that the model is providing incorrect predictions and we may want to find the reason. For instance, a patient with a very low risk-score experiences heart attack. What has driven that prediction?
A model is a function with a \(p\)-dimensional vector \(x\) as an argument. The plot of the value(s) of the function can be constructed in a \(p+1\)-dimensional space. An example with \(p=2\) is presented in Figure @ref(fig:cutsSurfaceReady). We will use it as an illustration of key ideas. The plot provides an information about the values of the function in the vicinity of point \(x^*\).
There are many different tools that may be used to explore the predictions of the model around a single point \(x^*\). In the following sections we will describe the most popular approaches. They can be divided into three classes.
- One approach is to investigate how the model prediction changes if the value of a single explanatory variable changes. It is useful in the so-called ,,What-If’’ scenarios. In particular, we can construct plots presenting the change of model-based predictions in function of a single variable. Such plots are usually called Ceteris Paribus profiles. They are presented in Chapter @ref(ceterisParibus). An example is provided in panel A of Figure @ref(fig:cutsTechnikiReady).
- Another approach is to analyze the curvature of the response surface (see Figure @ref(fig:cutsSurfaceReady)) around the point of interest \(x^*\). Treating the model as a function, we are interested in the local behavior of this function around \(x^*\). In case of a black-box model, we approximate it with a simpler white-box model around \(x^*\). An example is provided in panel B of Figure @ref(fig:cutsTechnikiReady). In Chapter @ref(LIME) we present the Local Interpretable Model-agnostic Explanations (LIME) method that exploits the concept of a ,,local model.’’
- Yet another approach is to analyze how the model prediction for point \(x^*\) is different from the average model prediction and how the difference can be distributed among the different dimensions (explanatory variables). It is often called the ,,variable attributions’’ approach. An example is provided in panel C of Figure @ref(fig:cutsTechnikiReady). In Chapter @ref(variableAttributionMethods) we present two methods implementing this approach, sequential conditioning and average conditioning (also called Shapley values).